Function Reference

_IETableWriteToArray

Reads the contents of a Table into an array.

#include <IE.au3>
_IETableWriteToArray ( ByRef $o_object [, $f_transpose] )

 

Parameters

$o_object Object variable of an InternetExplorer.Application, Table object
$f_transpose Boolean value specifying whether to swap the rows and columns in the output array

 

Return Value

Success: Returns a 2-dimensional array containing the contents of the Table
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type
@Extended: Contains invalid parameter number

 

Remarks

When table cells span multiple columns or rows, blank array elements are added to properly align the results. Data in spanning cells will be in the left or uppermost array elements.

Tables are often nested in HTML documents. If all of your data is unexpectedly returned in a single array element, you may need to reference a more deeply nested table to this function.

 

Related

_IETableGetCollection

 

Example


; *******************************************************
; Example 1 - Open a browser with the table example, get a reference to the second table
;               on the page (index 1) and read its contents into a 2-D array
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("table")
$oTable = _IETableGetCollection ($oIE, 1)
$aTableData = _IETableWriteToArray ($oTable)

; *******************************************************
; Example 2 - Same as Example 1, except transpose the output array and display
;               the results with _ArrayDisplay()
; *******************************************************
;
#include <IE.au3>
#include <Array.au3>
$oIE = _IE_Example ("table")
$oTable = _IETableGetCollection ($oIE, 1)
$aTableData = _IETableWriteToArray ($oTable, True)
_ArrayDisplay($aTableData)